﻿using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.SpreadsheetML.Drawing
{
    [XmlRoot("xfrm", Namespace = Constants.Drawing)]
    public class Transform2d : XmlSerializable
    {
        [Optional]
        [XmlAttribute("rot", Form = XmlSchemaForm.Qualified)]
        public Nullable<int> Rotation { get; set; }

        [Optional]
        [XmlAttribute("flipH", Form = XmlSchemaForm.Qualified)]
        public Nullable<bool> HorizontalFlip { get; set; }

        [Optional]
        [XmlAttribute("flipV", Form = XmlSchemaForm.Qualified)]
        public Nullable<bool> VerticalFlip { get; set; }

        [Optional]
        [XmlElement("off", Namespace = Constants.Graphic)]
        public SimplePosition Offset { get; set; }

        [Optional]
        [XmlElement("ext", Namespace = Constants.Graphic)]
        public Extent Extents { get; set; }

        public Transform2d() { }
    }
}
